< previous page page_248 next page >

Page 248
the byte array to a Visual Basic stringin this case, the string that returns the results of the function.
One More Problem
The program shown here works perfectly.
Or does it?
Try adding the following function to the GUIDPuzzle form:
Private Sub cmdMemTest_Click()
   Dim obj As New GUIDObject
   Do While True
      lblGUIDString.Caption = obj.GetCLSIDAsString()
      DoEvents
   Loop
End Sub
When you click on the cmdMemTest button, the GetCLSIDAsString function will be called repeatedly. If you're running under Windows NT, bring up the NT performance monitor program (look in the Administrative Tools entry in your Start menu). Add a chart entry that monitors available memory. Scale the chart so that the initial memory usage line appears somewhere near the center of the window. If you're using Windows 95, you can periodically check the amount of available memory by bringing up the About box for an Explorer window. The result will be similar to that shown in Figure S27-3. The amount of available memory is gradually decreasing!
This is called a memory leak, and it's a very
0248-01.gif
Figure S27-3:
NT Performance Monitor illustrates a memory leak

 
< previous page page_248 next page >